# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

# https://github.com/trailofbits/manticore/issues/1426#issuecomment-1382352246
pkgname=python-z3-solver-pep517
_pkgname=z3-solver
pkgver=4.12.0.0
pkgrel=5
pkgdesc='An efficient SMT solver library.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/z3-solver/'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
conflicts=('python-z3-solver' 'z3')
provides=('python-z3-solver' 'z3')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('09dcab97a6387ae88544e9e5927e8de3421a1153f3af077ba392f94c71aacd28c7607d481789b88b0b4b2d71e2ae3de3649d9995820729dd4a00cc57ea5c3ead')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    "$_pkgname"
}

